package models;

import play.*;
import play.data.binding.As;
import play.data.validation.Required;
import play.db.jpa.*;

import javax.persistence.*;
import javax.xml.ws.RequestWrapper;

import java.util.*;

@Entity
public class Consulta extends Model{
	
	@Required
	@As(lang={"*"}, value={"dd/MM/yyyy HH:mm"})
	public Date dataHora;
	
	
	@ManyToOne
	@Required
	public Dentista dentista;
	
	@ManyToOne
	@Required
	public Paciente paciente;
	
	@ManyToOne
	@Required
	public Procedimento procedimento;
	
	public Boolean realizada;

	@Override
	public String toString() {
		return "Consulta [dataHora=" + dataHora + ", dentista=" + dentista
				+ ", paciente=" + paciente + "]";
	}
	
	
	
	
    
}
